from random import randint
def Defto(s):
    to={0:" ",1:"0",2:"1"}
    m={"A":"0000","B":"0001","C":"0010","D":"0011","E":"0100","F":"0101","G":"0110","H":"0111","I":"1000","J":"1001","K":"1010","L":"1011","M":"1100","N":"1101","O":"1110","P":"1111"}
    k=''
    for st in s:
        try:
            k+=m[st]+to[0]
        except KeyError:
            k+=to[randint(1,2)]+to[randint(1,2)]+to[randint(1,2)]+to[randint(1,2)]+to[0]
    return k
def to(s):
    m={'0000':'A','0001':'B','0010':'C','0011':'D','0100':'E','0101':'F','0110':'G','0111':'H','1000':'I','1001':'J','1010':'K','1011':'L','1100':'M','1101':'N','1110':'O','1111':'P'}
    j=''
    k=''
    for s in s:
        if s == ' ':
            continue
        k+=s
        if len(k) == 4:
            try:
                j+=m[k]
            except KeyError:
                j+=m[str(randint(0,1))+str(randint(0,1))+str(randint(0,1))+str(randint(0,1))]
            k=''
    return j